<template>
  <div>
    <Card>
      <Table
        :columns="threadColumns"
        :data-source="dataSource"
        :pagination="false"
        :scroll="{ y: 340 }"
        :indentSize="5"
      >
      </Table>
    </Card>
  </div>
</template>
<script lang="ts" setup>
import { Table, Card } from 'ant-design-vue';
import { ref } from 'vue';
import { getAnalyze } from '/@/api/maintenance-center/skywalking/profiling/profiling';
import { threadColumns } from '/@/views/maintenance-center/resource-monitor/skywalking/profiling/component/traceTable/data';
const dataSource = ref([]);
const param = ref();
const getData = async () => {
  let res = await getAnalyze(param.value);
  dataSource.value = res;
};
const setTable = (threadParam) => {
  param.value = threadParam;
  getData();
};
const clearTable = () => {
  dataSource.value = [];
};
defineExpose({ setTable, clearTable });
</script>
<style lang="less">
.ant-pagination {
  float: right;
}
</style>
